package com.example.java.base.concurrency.threadpool.task;

import lombok.extern.slf4j.Slf4j;

/**
 * ShutDownTask:演示关闭线程的任务
 *
 * @author zhangxiaoxiang
 * @date 2020/11/5
 */
@Slf4j
public class ShutDownTask implements Runnable {
    @Override
    public void run() {
        try {
            Thread.sleep(500);
            log.info(Thread.currentThread().getName());
        } catch (Exception e) {
            log.info(Thread.currentThread().getName() + "被中断了");
        }
    }
}